package lesson03;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;

public class Client {

    public static void main(String[] args) throws IOException {
        Socket chatSocket = new Socket("127.0.0.1", 9999);

        InputStreamReader is = new InputStreamReader(chatSocket.getInputStream());
        BufferedReader reader = new BufferedReader(is);
        String message = reader.readLine();
        System.out.println(message);
        reader.close();
    }
}
